﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace WaterRevenueMS.Domain.ViewModels.ReadMeterMS.TaskTemplet
{
    public class TaskTempletModel
    {
        public TaskTempletModel()
        {
            Search = new SearchModel();
            Areas = new List<SelectListItem>
            {
                new SelectListItem{Text="请选择区域",Value="0"}
            };
            MeterBooks = new List<SelectListItem>
            {
                new SelectListItem{Text="请选择表册",Value="0"}
            };
            MeterReaders = new List<SelectListItem>
            {
                new SelectListItem{Text="请选择抄表员",Value="0"}
            };
        }

        public int Id { get; set; }

        [Display(Name = "模版名称")]
        [Required(ErrorMessage="模版名称不能为空")]
        [StringLength(16, ErrorMessage = "模版名称不能大于{1}个字符")]
        public string Ren_WMC { get; set; }

        public int Chao_BND { get; set; }

        public byte Chao_BYD { get; set; }

        [RegularExpression(@"^\+?[1-9][0-9]*$", ErrorMessage = "请选择抄表区域")]
        public int? Qu_YSZ_No { get; set; }
        public string AreaName { get; set; }
        public List<SelectListItem> Areas { get; set; }

        public int? Biao_CSZ_No { get; set; }
        public string MeterBookName { get; set; }
        public List<SelectListItem> MeterBooks { get; set; }

        public int? Chao_BY_No { get; set; }
        public string MeterReaderName { get; set; }
        public List<SelectListItem> MeterReaders { get; set; }

        public bool IsTaskTemplet { get; set; }

        public SearchModel Search { get; set; }
    }

    public class SearchModel {
    }
}
